<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta name="Content-Type" content="text/html; charset=UTF-8" />
<title>Class: Sass::Exec::SassConvert</title>
<link rel="stylesheet" href="style.css" tppabs="http://sass-lang.com/docs/yardoc/css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="common.css" tppabs="http://sass-lang.com/docs/yardoc/css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '../..';
  if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="jquery.js" tppabs="http://sass-lang.com/docs/yardoc/js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="app.js" tppabs="http://sass-lang.com/docs/yardoc/js/app.js"></script>

  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="_index.html" tppabs="http://sass-lang.com/docs/yardoc/_index.html">Index (S)</a> &raquo; 
    <span class='title'><a href="Sass-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass.html" title="Sass (module)">Sass</a></span> &raquo; <span class='title'><a href="Exec.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Exec.html" title="Sass::Exec (module)">Exec</a></span>
     &raquo; 
    <span class="title">SassConvert</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="javascript:if(confirm(%27http://sass-lang.com/docs/yardoc/Sass/Exec/.  \n\nThis file was not retrieved by Teleport Pro, because the server reports that this file cannot be found.  \n\nDo you want to open it from the server?%27))window.location=%27http://sass-lang.com/docs/yardoc/Sass/Exec/.%27" tppabs="http://sass-lang.com/docs/yardoc/Sass/Exec/." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  <a id="class_list_link" href="#">Class List</a>
  <a id="method_list_link" href="#">Method List</a>
  <a id ="file_list_link" href="#">File List</a>
</div>

      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Class: Sass::Exec::SassConvert 
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName"><a href="Generic.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Exec/Generic.html" title="Sass::Exec::Generic (class)">Generic</a></span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next"><a href="Generic.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Exec/Generic.html" title="Sass::Exec::Generic (class)">Generic</a></li>
          
            <li class="next">Sass::Exec::SassConvert</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">/var/www/sass-pages/.sass/lib/sass/exec.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>The <code>sass-convert</code> executable.</p>

  </div>
</div>
<div class="tags">
  
</div>
  <h2>Constant Summary</h2>
  


  
  
  
  

  <h2>Instance Method Summary</h2>

  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">- (SassConvert) <strong>initialize</strong>(args) </a>
    

    
  </span>
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  

  
    <span class="summary_desc">A new instance of SassConvert.</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#process_result-instance_method" title="#process_result (instance method)">- <strong>process_result</strong> </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc">Processes the options set by the command-line arguments, and runs the CSS compiler appropriately.</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#set_opts-instance_method" title="#set_opts (instance method)">- <strong>set_opts</strong>(opts) </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc">Tells optparse how to parse the arguments.</span>
  
</li>

    
  </ul>

  
  
  
  
  
  <h3 class="inherited">Methods inherited from <a href="Generic.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Exec/Generic.html" title="Sass::Exec::Generic (class)">Generic</a></h3>
  <p class="inherited"><a href="Generic.html#color-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Exec/Generic.html#color-instance_method" title="Sass::Exec::Generic#color (method)">#color</a>, <a href="Generic.html#get_line-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Exec/Generic.html#get_line-instance_method" title="Sass::Exec::Generic#get_line (method)">#get_line</a>, <a href="Generic.html#parse-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Exec/Generic.html#parse-instance_method" title="Sass::Exec::Generic#parse (method)">#parse</a>, <a href="Generic.html#parse%21-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Exec/Generic.html#parse%21-instance_method" title="Sass::Exec::Generic#parse! (method)">#parse!</a>, <a href="Generic.html#puts-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Exec/Generic.html#puts-instance_method" title="Sass::Exec::Generic#puts (method)">#puts</a>, <a href="Generic.html#puts_action-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Exec/Generic.html#puts_action-instance_method" title="Sass::Exec::Generic#puts_action (method)">#puts_action</a>, <a href="Generic.html#to_s-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Exec/Generic.html#to_s-instance_method" title="Sass::Exec::Generic#to_s (method)">#to_s</a></p>
<div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <p class="signature first" id="initialize-instance_method">
  
    - (<tt><a href="" title="Sass::Exec::SassConvert (class)">SassConvert</a></tt>) <strong>initialize</strong>(args) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>A new instance of SassConvert</p>

  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='type'>(<tt>Array&lt;String&gt;</tt>)</span>
      
      
        <span class='name'>args</span>
      
      
      
        &mdash;
        The command-line arguments
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


488
489
490
491
492
493</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/exec.rb', line 488</span>

def initialize(args)
  super
  require 'sass'
  @options[:for_tree] = {}
  @options[:for_engine] = {:cache => false, :read_cache => true}
end</pre>
    </td>
  </tr>
</table>
</div>
  
</div>


  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="process_result-instance_method">
  
    - <strong>process_result</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>Processes the options set by the command-line arguments, and runs the CSS compiler appropriately.</p>

  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


578
579
580
581
582
583
584
585
586
587
588
589
590
591
592</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/exec.rb', line 578</span>

def process_result
  require 'sass'

  if @options[:recursive]
    process_directory
    return
  end

  super
  input = @options[:input]
  raise "Error: '#{input.path}' is a directory (did you mean to use --recursive?)" if File.directory?(input)
  output = @options[:output]
  output = input if @options[:in_place]
  process_file(input, output)
end</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="set_opts-instance_method">
  
    - <strong>set_opts</strong>(opts) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>Tells optparse how to parse the arguments.</p>

  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='type'>(<tt>OptionParser</tt>)</span>
      
      
        <span class='name'>opts</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/exec.rb', line 498</span>

def set_opts(opts)
  opts.banner = "Usage: sass-convert [options] [INPUT] [OUTPUT]\n\nDescription:\n  Converts between CSS, Sass, and SCSS files.\n  E.g. converts from SCSS to Sass,\n  or converts from CSS to SCSS (adding appropriate nesting).\n\nOptions:\n"

  opts.on('-F', '--from FORMAT',
    'The format to convert from. Can be css, scss, sass.',
    'By default, this is inferred from the input filename.',
    'If there is none, defaults to css.') do |name|
    @options[:from] = name.downcase.to_sym
    raise "sass-convert no longer supports LessCSS." if @options[:from] == :less
    unless [:css, :scss, :sass].include?(@options[:from])
      raise "Unknown format for sass-convert --from: #{name}"
    end
  end

  opts.on('-T', '--to FORMAT',
    'The format to convert to. Can be scss or sass.',
    'By default, this is inferred from the output filename.',
    'If there is none, defaults to sass.') do |name|
    @options[:to] = name.downcase.to_sym
    unless [:scss, :sass].include?(@options[:to])
      raise "Unknown format for sass-convert --to: #{name}"
    end
  end

  opts.on('-R', '--recursive',
    'Convert all the files in a directory. Requires --from and --to.') do
    @options[:recursive] = true
  end

  opts.on('-i', '--in-place',
    'Convert a file to its own syntax.',
    'This can be used to update some deprecated syntax.') do
    @options[:in_place] = true
  end

  opts.on('--dasherize', 'Convert underscores to dashes') do
    @options[:for_tree][:dasherize] = true
  end

  opts.on('--indent NUM',
    'How many spaces to use for each level of indentation. Defaults to 2.',
    '"t" means use hard tabs.') do |indent|

    if indent == 't'
      @options[:for_tree][:indent] = "\t"
    else
      @options[:for_tree][:indent] = " " * indent.to_i
    end
  end

  opts.on('--old', 'Output the old-style ":prop val" property syntax.',
                   'Only meaningful when generating Sass.') do
    @options[:for_tree][:old] = true
  end

  opts.on('-C', '--no-cache', "Don't cache to sassc files.") do
    @options[:for_engine][:read_cache] = false
  end

  unless ::Sass::Util.ruby1_8?
    opts.on('-E encoding', 'Specify the default encoding for Sass and CSS files.') do |encoding|
      Encoding.default_external = encoding
    end
  end

  super
end</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>
    
    <div id="footer">
  Generated on Fri Mar  8 20:33:49 2013 by 
  <a href="javascript:if(confirm(%27http://yardoc.org/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?%27))window.location=%27http://yardoc.org/%27" tppabs="http://yardoc.org/" title="Yay! A Ruby Documentation Tool">yard</a>
  0.5.3 (ruby-1.8.7).
</div>


  <script type="text/javascript">
  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  </script>
  <script type="text/javascript">
  try {
  var pageTracker = _gat._getTracker("UA-535380-8");
  pageTracker._trackPageview();
  } catch(err) {}</script>


  </body>
</html>